var finishactivity = {
    createEvent: function(title, successCallback, errorCallback,location) {

        cordova.exec(
            successCallback, // success callback function
            errorCallback, // error callback function
            'MySystemPlugin', // mapped to our native Java class called "CalendarPlugin"
            location, // with this action name
            [{                  // and this array of custom arguments to create our entry

            }]
        );
    }
}

cordova.define("com.fromfuture.xuhuidoc.cordova.plugin.MySystemPlugin", function(require, exports, module) {
var exec = require('cordova/exec');
    var callJSs = {
    init:function() {
        cordova.require('cordova/channel').onCordovaReady.subscribe(function(){
            exec(succeedCallback, null, "MySystemPlugin", "", []);
            function succeedCallback(message){
        //执行js代码
        eval(message);
        //还可以这样，大胆的发挥你的想象力
        /*
        if(message=='f1')
            alert(1);
        else if(message == 'f2')
            alert(2);
        ……
        */　　　　　　　　　
            }
        });
        }
    };

    module.exports = callJSs;
});